<?php
$name = $_POST["name"];
$sex = $_POST["sex"];
$college = $_POST["college"];
$major = $_POST["major"];
$tel = $_POST["tel"];
$job = $_POST["job"];
$hobby = $_POST["hobby"];
$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("sign", $con);

$sql="INSERT INTO students (name,sex,college,major,tel,job,hobby)
VALUES
('$name','$sex','$college','$tel','$job','$hobby')";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
mysql_close($con)
?>